package com.mycity.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.ResultSetExtractor;

import com.mycity.bean.Gamer;

public class GamerSetExtractor implements ResultSetExtractor<Gamer> {

	  @Override
	  public Gamer extractData(ResultSet rs) throws SQLException {
	    Gamer Gamer = new Gamer();
	    Gamer.setUserId(rs.getInt("userId"));
	    Gamer.setNumComments(rs.getInt("numComments"));
	    Gamer.setNumDiamonds(rs.getInt("numDiamonds"));
	    Gamer.setNumLocations(rs.getInt("numLocations"));
	    Gamer.setNumPosts(rs.getInt("numPosts"));
	    Gamer.setNumStars(rs.getInt("numStars"));
	    Gamer.setExperience(rs.getInt("experience"));
	    return Gamer;
	  }
}